<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: OpenSocial::FetchAppDataRequest</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">OpenSocial::FetchAppDataRequest</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/lib/opensocial/appdata_rb.html">
                lib/opensocial/appdata.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="Request.html">
                Request
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Provides the ability to request a <a href="Collection.html">Collection</a>
of <a href="AppData.html">AppData</a> for a given user or set of users.
</p>
<p>
The FetchAppData wraps a simple request to an OpenSocial endpoint for a <a
href="Collection.html">Collection</a> of <a
href="AppData.html">AppData</a>. As parameters, it accepts a user ID and
selector. This request may be used, standalone, by calling <a
href="FetchAppDataRequest.html#M000027">send</a>, or bundled into an <a
href="RpcRequest.html">RpcRequest</a>.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000026">new</a>&nbsp;&nbsp;
      <a href="#M000028">parse_rpc_response</a>&nbsp;&nbsp;
      <a href="#M000027">send</a>&nbsp;&nbsp;
      <a href="#M000029">to_json</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">SERVICE</td>
          <td>=</td>
          <td class="context-item-value">'appdata'</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
Defines the service fragment for use in constructing the request URL or
JSON

</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000026" class="method-detail">
        <a name="M000026"></a>

        <div class="method-heading">
          <a href="FetchAppDataRequest.src/M000026.html" target="Code" class="method-signature"
            onclick="popupCode('FetchAppDataRequest.src/M000026.html');return false;">
          <span class="method-name">new</span><span class="method-args">(connection = nil, guid = '@me', selector = '@self', aid = '@app')</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Initializes a request to fetch appdata for the specified user and group, or
the default (@me, @self). A valid <a href="Connection.html">Connection</a>
is not necessary if the request is to be used as part of an <a
href="RpcRequest.html">RpcRequest</a>.
</p>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000028" class="method-detail">
        <a name="M000028"></a>

        <div class="method-heading">
          <a href="FetchAppDataRequest.src/M000028.html" target="Code" class="method-signature"
            onclick="popupCode('FetchAppDataRequest.src/M000028.html');return false;">
          <span class="method-name">parse_rpc_response</span><span class="method-args">(response)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Selects the appropriate fragment from the JSON response in order to create
a native object.
</p>
        </div>
      </div>

      <div id="method-M000027" class="method-detail">
        <a name="M000027"></a>

        <div class="method-heading">
          <a href="FetchAppDataRequest.src/M000027.html" target="Code" class="method-signature"
            onclick="popupCode('FetchAppDataRequest.src/M000027.html');return false;">
          <span class="method-name">send</span><span class="method-args">(unescape = true)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sends the request, passing in the appropriate SERVICE and specified
instance variables. Accepts an unescape parameter, defaulting to true, if
the returned data should be unescaped.
</p>
        </div>
      </div>

      <div id="method-M000029" class="method-detail">
        <a name="M000029"></a>

        <div class="method-heading">
          <a href="FetchAppDataRequest.src/M000029.html" target="Code" class="method-signature"
            onclick="popupCode('FetchAppDataRequest.src/M000029.html');return false;">
          <span class="method-name">to_json</span><span class="method-args">(*a)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Converts the request into a JSON fragment that can be used as part of a
larger <a href="RpcRequest.html">RpcRequest</a>.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>